<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <%layout("/WEB-INF/view/common/inc/admin_head.html",{title:'', styles:'bootstrap,font-awesome,animate,style,bootstrap-table,layui-date,auto-complete,dtvalidate,layui,chosen,fancybox'}){%>
    <style type="text/css">
        body{padding-top:10px;
            padding-left: 10px;}
        *{margin:0;padding:0;list-style-type:none;}
        a,img{border:0;}
        .demo h2{font-size:16px;color:#3366cc;height:30px;}
        .demo li{float:left;}
    </style>
    <%}%>
</head>

<body>
<div class="row">
    <div class="col-sm-12">
        <!-- START 右侧数据 -->
        <div class="ibox float-e-margins" style="margin-bottom: 0px;">
            <div class="ibox-content" style="padding:15px 20px 0px 20px;">
                <form id="search-form" role="form" class="form-horizontal" autocomplete="off">
                    <input type="hidden" readonly id="productMember" name="productMember"  class="form-control" value="${user.userRealname}">
                    <div class="form-group">
                        <label class="control-label col-sm-1">柜号:</label>
                        <div class="col-sm-2">
                            <input type="text" id="refusedPlanNo" name="refusedPlanNo" class="form-control">
                        </div>
                        <a class="search-btn btn btn-success" style="margin-bottom: 0px;">查询</a>
                    </div>
                </form>
            </div>
            <form>
                <div id="toolbar" class="btn-group" style="margin-bottom:5px;">
                    <button class="export-btn layui-btn  layui-btn-sm" style="margin-top: -6px;margin-left: -4px">
                        <i class="fa fa-download" aria-hidden="true"></i> 导出当前数据
                    </button>
                </div>
            </form>
            <!-- START 数据表格 -->
            <table id="relatedTable"
                   data-toolbar="#toolbar"
                   data-side-pagination="server"
                   data-pagination="true"
                   data-resizable="true"
                   data-url="/sea/supply/billRefused/findByCnd.do"
                   data-page-size="15"
                   class="table table-striped table-hover"
            >
            </table>
            <!-- END 数据表格 -->
        </div>
    </div>
</div>

<%layout("/WEB-INF/view/common/inc/admin_js.html",{modules:'jquery,bootstrap,bootstrap-table,bootstrap-table-zh-CN,dtvalidate,dtvalidate-lang-zh_cn,laydate,layer,layui,chosen,chosen-demo,upload,imgbox'}){}%>
<script>


    var $relatedTable = $('#relatedTable');
    $(function(){

        //START 表格配置
        $relatedTable.bootstrapTable({
            columns: [
                {
                    title: '海关单编号',
                    field: 'refusedNo',
                    align: 'center',
                    valign: 'middle'
                },
                {
                    title: '柜号',
                    field: 'refusedPlanNo',
                    align: 'center',
                    valign: 'middle'
                },
                {
                    title: '渠道',
                    field: 'refusedChannel',
                    align: 'center',
                    valign: 'middle'
                },
                {
                    title: '收货金额',
                    field: 'refusedCreateMoney',
                    align: 'center',
                    valign: 'middle'
                },
                {
                    title: '发票金额',
                    field: 'refusedBillMoney',
                    align: 'center',
                    valign: 'middle'
                },
                {
                    title: '财务审批金额',
                    field: 'refusedFinanceMoney',
                    align: 'center',
                    valign: 'middle'
                },
                {
                    title: '付款审批金额',
                    field: 'refusedPaymentMoney',
                    align: 'center',
                    valign: 'middle'
                },
                {
                    title: '核销金额',
                    field: 'produceCheckMoney',
                    align: 'center',
                    valign: 'middle'
                },
                {
                    title: '杂项费',
                    field: 'produceUnusualMoney',
                    align: 'center',
                    valign: 'middle'
                },
                {
                    title: '备注',
                    field: 'refusedRemark',
                    align: 'center',
                    valign: 'middle'
                }
            ],
            onLoadSuccess : function(){

            }
        });

        $('.search-btn').on('click',function(){
            $relatedTable.bootstrapTable('refresh', { url:'${ctxPath}/sea/supply/billRefused/findByCnd?'+$('#search-form').serialize() });
        });


        $(".export-btn").click(function () {
            window.location.href='/sea/finance/report/export.do?'+$('#search-form').serialize();
        });
    });
</script>
</body>
</html>
